to_text

pure function to_text(): text

Convert this decimal to a base 10 text representation.

Since

0.9.1


pure function to_text(scientific: boolean): text

Convert this decimal to a base 10 text representation, optionally using scientific notation (also called standard form), e.g. 6.0221E+23.

The general output format when scientific notation is used is mEsn, where m represents a non-zero coefficient, E is the literal character, s represents the sign (either + or -), and n represents the exponent.

Note that the maximum number of decimal places for the coefficient is 20, and therefore any precision beyond this in the original decimal value is lost.

Since

0.9.1

Parameters

scientific

If true, the output will use scientific notation. If false, decimal representation will be used.